<%@ Page Language="C#" MasterPageFile="~/Admin/AdminMasterPage.master" AutoEventWireup="true" Async="true"
    CodeFile="AddNewProvider.aspx.cs" Inherits="Admin_provider_AddNewProvider" MaintainScrollPositionOnPostback="true"
    Title="Add New Provider - ComparExpress Admin" %>

<%@ Register Src="~/controls/usrSalutation.ascx" TagName="usrSalutation" TagPrefix="uc1" %>
<%@ Register Src="~/controls/usrDate.ascx" TagName="usrDate" TagPrefix="uc2" %>
<%@ Register Src="~/controls/usrGender.ascx" TagName="usrGender" TagPrefix="uc3" %>
<%@ Register Src="~/controls/usrIdType.ascx" TagName="usrIdType" TagPrefix="uc4" %>
<%@ Register Src="~/controls/usrNationality.ascx" TagName="usrNationality" TagPrefix="uc5" %>
<%@ Register Src="../../controls/usrIdNumber.ascx" TagName="usrIdNumber" TagPrefix="uc6" %>
<%@ Register Src="../../controls/usrOccupation.ascx" TagName="usrOccupation" TagPrefix="uc7" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">

    <script src="../../controls/IdNumber.js" type="text/javascript"></script>

    <div class="contents">
        <table cellpadding="3" cellspacing="0" border="0">
            <tr>
                <td colspan="2">
                    <h1>
                        Create Provider Account</h1>
                    <asp:Label ID="lblProviderID" runat="server" Visible="false"></asp:Label>
                </td>
            </tr>
            <tr>
                <td style="width: 30%" valign="top">
                    Email
                </td>
                <td valign="top">
                    <asp:TextBox ID="txtEmailAddress" runat="server" class="text" MaxLength="150"
                        Width="250px"></asp:TextBox><asp:RequiredFieldValidator ID="rfvEmail" runat="server"
                            ControlToValidate="txtEmailAddress" Display="Dynamic" ErrorMessage="Require Email address"
                            ValidationGroup="newprovider">*</asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="rfvEmailValid" runat="server" ControlToValidate="txtEmailAddress"
                        ErrorMessage="Invalid Email address." ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"
                        ValidationGroup="newprovider">*</asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
                <td valign="top">
                    Password
                </td>
                <td valign="top">
                    <asp:TextBox ID="txtAuthCode" runat="server" class="text" TextMode="Password" MaxLength="15"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvPassword" runat="server" ControlToValidate="txtAuthCode"
                        ErrorMessage="Require Password" ValidationGroup="newprovider">*</asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td valign="top">
                    Confirm Password
                </td>
                <td valign="top">
                    <asp:TextBox ID="txtAuthCodeConfirm" runat="server" class="text" TextMode="Password"
                        MaxLength="15"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvConfirmPassword" runat="server" ControlToValidate="txtAuthCodeConfirm"
                        Display="Dynamic" ErrorMessage="Required Confirm Password." ValidationGroup="newprovider">*</asp:RequiredFieldValidator><asp:CompareValidator
                            ID="CompareValidator1" runat="server" ControlToCompare="txtAuthCode" ControlToValidate="txtAuthCodeConfirm"
                            ErrorMessage="Both password should be same" ValidationGroup="newprovider" Display="Dynamic">*</asp:CompareValidator>
                </td>
            </tr>
            <tr>
                <td valign="top">
                    Salutation
                </td>
                <td valign="top">
                    <uc1:usrSalutation ID="UsrSalutation1" runat="server" ValidationGroup="newprovider" />
                </td>
            </tr>
            <tr>
                <td valign="top">
                    First Name
                </td>
                <td valign="top">
                    <asp:TextBox ID="txtFirstName" runat="server" class="text" Width="200px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td valign="top">
                    Surname
                </td>
                <td valign="top">
                    <asp:TextBox ID="txtSurName" runat="server" class="text" Width="200px"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvSurName" runat="server" ControlToValidate="txtSurName"
                        ErrorMessage="Require Surname." ValidationGroup="newprovider">*</asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td valign="top">
                    Date Of Birth
                </td>
                <td valign="top">
                    <uc2:usrDate ID="UsrDate1" runat="server" ValidationGroup="newprovider" ErrorMessage="Require date of birth."
                        IsEnabled="True" />
                </td>
            </tr>
            <tr>
                <td valign="top">
                    Gender
                </td>
                <td valign="top">
                    <uc3:usrGender ID="UsrGender1" runat="server" ValidationGroup="newprovider" />
                </td>
            </tr>
            <tr>
                <td valign="top">
                    Marital Status
                </td>
                <td valign="top">
                    <asp:DropDownList ID="ddlMaritalStatus" runat="server" class="text">
                        <asp:ListItem Selected="True" Value="-1">Select</asp:ListItem>
                        <asp:ListItem Text="Single" Value="1"></asp:ListItem>
                        <asp:ListItem Text="Married" Value="2"></asp:ListItem>
                        <asp:ListItem Text="Widowed" Value="3"></asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td valign="top">
                    Occupation
                </td>
                <td valign="top">
                    <asp:DropDownList ID="ddlOccupationType" runat="server" class="text">
                        <asp:ListItem Value="-1">Select</asp:ListItem>
                        <asp:ListItem Value="1">Indoors</asp:ListItem>
                        <asp:ListItem Value="2">Outdoors</asp:ListItem>
                    </asp:DropDownList>
                    <uc7:usrOccupation ID="usrOccupation1" runat="server" ValidationGroup="newprovider"
                        ErrorMessage="Require occupation." />
                </td>
            </tr>
            <tr>
                <td valign="top">
                    Identification Type
                </td>
                <td valign="top">
                    <uc4:usrIdType ID="usrIdType1" runat="server" ValidationGroup="newprovider"  ErrorMessage ="Type"/>
                </td>
            </tr>
            <tr>
                <td valign="top">
                    Identification Number
                </td>
                <td valign="top">
                    <uc6:usrIdNumber ID="usrIdNumber1" runat="server" IsEnabled="True" ValidationGroup="newprovider"
                        IdNoErrorMessage="Id number is invalid." IdNoLengthErrorMessage="Id number is invalid."
                        IdNoRequireErrorMessage="Require Id number." />
                </td>
            </tr>
            <tr>
                <td valign="top">
                    Nationality
                </td>
                <td valign="top">
                    <uc5:usrNationality ID="UsrNationality1" runat="server" ValidationGroup="newprovider" />
                </td>
            </tr>
            <tr>
                <td valign="top">
                    Hightest Education
                </td>
                <td valign="top">
                    <asp:TextBox ID="txtHighEducation" runat="server" class="text" MaxLength="100" Width="200px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td valign="top">
                    Residential Phone Number
                </td>
                <td valign="top">
                    <asp:TextBox ID="txtHomePhoneNo" runat="server" class="text" MaxLength="20"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td valign="top">
                    Mobile Number
                </td>
                <td valign="top">
                    <asp:TextBox ID="txtMobileNo" runat="server" class="text" MaxLength="20"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td valign="top">
                    Office Phone Number
                </td>
                <td valign="top">
                    <asp:TextBox ID="txtOfficeNo" runat="server" class="text" MaxLength="20"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtOfficeNo"
                        Display="Dynamic" ErrorMessage="Require Office Phone No" ValidationGroup="newprovider">*</asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td valign="top">
                    Fax No
                </td>
                <td valign="top">
                    <asp:TextBox ID="txtOfficeFaxNo" runat="server" class="text" MaxLength="20"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td valign="top">
                    Company Name
                </td>
                <td valign="top">
                    <asp:DropDownList ID="ddlProviderCompany" runat="server">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td valign="top">
                    PostCode
                </td>
                <td valign="top">
                    <asp:TextBox ID="txtOfficePostCode" runat="server" class="text" MaxLength="5" Width="100px"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtOfficePostCode"
                        Display="Dynamic" ErrorMessage="Require Post Code" ValidationGroup="newprovider">*</asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ErrorMessage="*"
                        ControlToValidate="txtOfficePostCode"  ValidationGroup="newprovider" ValidationExpression="\d{5}"></asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
                <td valign="top">
                    Unit No
                </td>
                <td valign="top">
                    <asp:TextBox ID="txtOfficeUnitNo1" runat="server" class="textsml" Width="50px" MaxLength="10"></asp:TextBox>-<asp:TextBox
                        ID="txtOfficeUnitNo2" runat="server" class="textsml" Width="50px" MaxLength="10"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td valign="top">
                    Street
                </td>
                <td valign="top">
                    <asp:TextBox ID="txtOfficeStreet" runat="server" class="text" MaxLength="100" Width="250px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td valign="top">
                    City
                </td>
                <td valign="top">
                    <asp:TextBox ID="txtOfficeCity" runat="server" class="text" MaxLength="50" Width="200px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td valign="top">
                    Country
                </td>
                <td valign="top">
                    <asp:DropDownList ID="ddlOfficeCountry" runat="server">
                        <asp:ListItem Selected="True" Value="-1">Select</asp:ListItem>
                        <asp:ListItem>Singapore</asp:ListItem>
                        <asp:ListItem>Malaysia</asp:ListItem>
                        <asp:ListItem>Myanmar</asp:ListItem>
                        <asp:ListItem>Thailand</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td>
                    <asp:ValidationSummary ID="ValidationSummary1" runat="server" ValidationGroup="newprovider" />
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Button ID="btnBack" runat="server" OnClick="btnBack_Click" OnClientClick="return confirm('Are your sure to go back?');"
                        Text="Back" CssClass="btn green" />
                </td>
                <td>
                    <asp:Button ID="btnClearForm" runat="server" OnClientClick="return confirm('Are you sure to clear form?');"
                        Text="Clear" CausesValidation="False" OnClick="btnClearForm_Click" CssClass="btn blue" />
                    <asp:Button ID="btnAddNew" runat="server" OnClientClick="return confirm('Are you sure to add new provider?');"
                        Text="Add New" ValidationGroup="newprovider" OnClick="btnAddNew_Click" CssClass="btn blue" />
                </td>
            </tr>
            <tr>
                <td>
                    &nbsp;
                </td>
                <td>
                    <asp:Label ID="lblMessage" runat="server" Font-Bold="True"></asp:Label>
                </td>
            </tr>
        </table>
    </div>
</asp:Content>
